package org.goyo.main.domain.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;

import org.goyo.main.domain.entity.system.SysDepGroup;
import org.goyo.main.domain.entity.system.SysUser;
import org.hibernate.annotations.GenericGenerator;


/**
 * 基础类
 * @author just4you
 * 
 * 2008-12-10下午10:59:32
 */
@MappedSuperclass
public class BaseObject implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@GenericGenerator(name = "generator", strategy = "org.hibernate.id.UUIDGenerator")
	@GeneratedValue(generator = "generator")
	private String uuid;
	
	/**
	 * 编号
	 */
	@Column
	private String number;
	/**
	 * 名称
	 */
	@Column
	private String name;
	
	/**
	 * 业务日期
	 */
	@Column
	private String bizDate;
	
	/**
	 * 状态
	 */
	@Column
	private String status;
	
	/**
	 * 创建人
	 */
	@ManyToOne
	@JoinColumn(name="createUserId")
	private SysUser createUser;
	
	/**
	 * 创建日期
	 */
	@Column
	private String createDate;
	/**
	 * 修改人
	 */
	@ManyToOne
	@JoinColumn(name="alterUserId")
	private SysUser alterUser;
	
	/**
	 * 修改日期
	 */
	@Column
	private String alterDate;
	
	/**
	 * 审核人
	 */
	@ManyToOne
	@JoinColumn(name="auditUserId")
	private SysUser auditUser;
	
	/**
	 * 审核日期
	 */
	@Column
	private String auditDate;
	
	/**
	 * 备注
	 */
	@Column
	private String remark;
	
	/**
	 * 提交人
	 */
	@ManyToOne
	@JoinColumn(name="submitUserId")
	private SysUser submitUser;
	
	/**
	 * 提交日期
	 */
	@Column
	private String submitDate;
	
	/**
	 * 部门
	 */
	@ManyToOne
	@JoinColumn(name="depGroupId")
	private SysDepGroup depGroup;
	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public SysUser getCreateUser() {
		return createUser;
	}

	public void setCreateUser(SysUser createUser) {
		if(createUser != null &&("".equals(createUser.getUuid()) || createUser.getUuid()==null))
			this.createUser = null;
		else
			this.createUser = createUser;
	}

	public SysUser getAlterUser() {
		return alterUser;
	}

	public void setAlterUser(SysUser alterUser) {
		if(alterUser != null &&("".equals(alterUser.getUuid()) || alterUser.getUuid()==null))
			this.alterUser = null;
		else
			this.alterUser = alterUser;	
	}

	public SysUser getAuditUser() {
		return auditUser;
	}

	public void setAuditUser(SysUser auditUser) {
		if(auditUser != null &&("".equals(auditUser.getUuid()) || auditUser.getUuid()==null))
			this.auditUser = null;
		else
			this.auditUser = auditUser;	
	}

	public String getBizDate() {
		return bizDate;
	}

	public void setBizDate(String bizDate) {
		this.bizDate = bizDate;
	}

	public String getCreateDate() {
		return createDate;
	}

	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}

	public String getAuditDate() {
		return auditDate;
	}

	public void setAuditDate(String auditDate) {
		this.auditDate = auditDate;
	}

	public String getAlterDate() {
		return alterDate;
	}

	public void setAlterDate(String alterDate) {
		this.alterDate = alterDate;
	}

	public String getSubmitDate() {
		return submitDate;
	}

	public void setSubmitDate(String submitDate) {
		this.submitDate = submitDate;
	}

	public SysUser getSubmitUser() {
		return submitUser;
	}

	public void setSubmitUser(SysUser submitUser) {
		if(submitUser != null &&("".equals(submitUser.getUuid()) || submitUser.getUuid()==null))
			this.submitUser = null;
		else
			this.submitUser = submitUser;	
	}
	
	public SysDepGroup getDepGroup() {
		return depGroup;
	}
	public void setDepGroup(SysDepGroup depGroup) {
		if(depGroup != null &&("".equals(depGroup.getUuid()) || depGroup.getUuid()==null))
			this.depGroup = null;
		else
			this.depGroup = depGroup;	
	}
	
}
